package com.dingreading.cloud.common.util;

/**
 * 运营类型 100自营  80联营  50品牌加盟  40产品加盟  20课程合作（悦读吧）
 */
public enum EnumOperationType {
    SELF(100, "自营"),
    CONSORTIUM(80, "联营"),
    BRAND_JOIN(50, "品牌加盟"),
    PRODUCT_JOIN(40, "产品加盟"),
    EASY_PRODUCT_JOIN(30, "轻量产品加盟"),
    COOPERATION(20, "课程合作"),
    ;

    private final int type;
    private final String name;

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    //构造方法
    EnumOperationType(int type, String name) {
        this.type = type;
        this.name = name;
    }

    public static String getTypeName(int type) {
        for (EnumOperationType data : EnumOperationType.values()) {
            if (data.getType() == type) {
                return data.getName();
            }
        }
        return "";
    }

}
